package HomeElements;

import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject2;

import static HomeElements.TanBySelectorElementType.*;
import static util.GetDevice.getDevice;

/**
 * Created by zhe.xiao on 2017/6/26.
 */

public class TanElements {
    private static UiDevice device = getDevice();

    /**
     * 升级按钮
     */
    public static UiObject2 shengJiElement(){
        return device.findObject(shengJi());
    }

    /**
     * 关闭升级窗口按钮
     */
    public static UiObject2 shengJiCloseElement(){
        return device.findObject(shengJiGuanBi());
    }

    /**
     * 接机送弹窗
     */
    public static UiObject2 jiJingSongTanElement(){
        return device.findObject(jieJiSongTan());
    }

    /**
     * 接机送弹窗关闭按钮
     */
    public static UiObject2 jieJiSongCloseElement(){
        return device.findObject(jieJiSongClose());
    }

    /**
     * 接机送的页面知道了的弹窗按钮
     */
    public static UiObject2 jieJiSongZhiElement(){
        return device.findObject(jieJiSongZhi());
    }

    public static UiObject2 homeTan(){
        return device.findObject(By.res("com.mqunar.atom.alexhome:id/atom_alexhome_del_icon"));
    }
}
